package com.health_predict_springboot.dao;

import com.health_predict_springboot.pojo.HealthIndicator;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface HealthIndicatorMapper {
    // 根据指标ID查询
    HealthIndicator selectByIndicatorId(Long indicatorId);
    
    // 根据用户ID查询指标列表
    List<HealthIndicator> selectByUserId(Long userId);
    
    // 查询所有指标
    List<HealthIndicator> selectAllIndicators();
    
    // 插入指标
    int insertIndicator(HealthIndicator indicator);
    
    // 更新指标
    int updateIndicator(HealthIndicator indicator);
    
    // 删除指标
    int deleteIndicator(Long indicatorId);
    
    // 分页查询指标
    List<HealthIndicator> selectIndicatorsByPage(Map<String, Object> params);
    
    // 查询指标总数
    int selectIndicatorCount(Map<String, Object> params);
    
    // 根据用户ID和提交时间范围查询
    List<HealthIndicator> selectByUserIdAndTimeRange(Map<String, Object> params);
    
    // 查询异常指标
    List<HealthIndicator> selectAbnormalIndicators();
}